from django.urls import path
from snippets import views
from rest_framework.urlpatterns import format_suffix_patterns

urlpatterns = [
    path('api/get_newest_block_info', views.get_newest_block_info),
    path('api/get_newest_transaction_info', views.get_newest_transaction_info),
    path('api/get_block_info_by_idx/<str:param>', views.get_block_info_by_idx),
    path('api/get_block_info_by_hash/<str:param>', views.get_block_info_by_hash),
    path('api/get_transaction/<str:hash>', views.get_transaction),
    path('api/get_extrinsics/<str:hash>', views.get_extrinsics),
    path('api/get_extrinsics/<str:hash>/<int:id>', views.get_extrinsics_by_id),
    path('api/get_extrinsics_by_block_number/<str:block_num>', views.get_extrinsics_by_block_number),
    path('api/get_latest_nft/<int:nft_type>', views.get_latest_nft),
    path('api/get_transaction_by_address/<str:address>/<int:page_size>/<int:page_index>', views.get_transaction_by_address),
]
urlpatterns = format_suffix_patterns(urlpatterns)
print(urlpatterns) 